fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

group_map

Sequence.group_map

group the elements of this sequence by a key of type and applies function f to all elements

example: group characters by category and add underscores around each character


=> {(digit => [_1_, _4_]), (letter => [_A_, _b_, _X_]), (other => [_?_])}

Type Parameters

K:property.orderable[src]
type of the keys
B:Any[src]
type of the values in the result
M:container.Map K (Sequence B)[src]
the type of the map to create

Arguments

key_f Unary K T[src]
function to generate the keys
f Unary B T[src]
function applied to each element
0.099dev (GIT hash e2d5298d8107bb5fe79600fdb06a49bc75756344)
last changed: 2026-11-23